<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../back-common.jsp"%>
<%@ include file="/WEB-INF/pages/common/taglib.jsp"%>
<script src="${contextPath}/resources/common/js/jquery.validate.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" media="screen" href="${contextPath}/resources/common/css/errorform.css" />

<table class="${tableclass}" style="width: 100%">
	   <tr>
		   <th>
		   		<strong class="am-text-primary am-text-lg">项目管理</strong> / 修改的密码
		   </th>
	   </tr>
</table>


<form:form   action="${contextPath}/admin/passwd/update" id="updatePwd" method="post">
	<table align="center" class="${tableclass}" id="col1" >

		<tbody>
		<tr>
			<td height="27" align="center" class="forumRow"><div align="right">原密码 <font color="ff0000">*</font></div></td>
			<td align="center" class="forumRow"><input type="password" name="oldPassword"  id="oldPassword"  value="" autocomplete="off"></td>
		</tr>
		<tr>
			<td height="27" align="center" class="forumRow"><div align="right">新密码 <font color="ff0000">*</font></div></td>
			<td align="center" class="forumRow"><input type="password" name="password"  id="password"  value="" autocomplete="off"></td>
		</tr>
		<tr>
			<td height="27" align="center" class="forumRow"><div align="right">确认密码 <font color="ff0000">*</font></div></td>
			<td align="center" class="forumRow"><input type="password" name="password2"  id="password2"  value="" autocomplete="off"></td>
		</tr>
		<tr >
			<td height="42" colspan="2" class="forumRow">
				<div align="center">
					<input type="submit" name="Submit" id="Submit" value="提交">
					<input type="button" name="cancel" id="cancel" value="返回" onclick="window.location='${contextPath}/admin/index'">
				</div>
			</td>
		</tr>
		</tbody>
		<tfoot>
		<tr class="sortable">
			<th colspan="2">
				<div align="left" style="color: red;">密码必须由大小写字母+数字+特殊符号组合，长度大于8位。</div>
			</th>
		</tr>
		</tfoot>
	</table>
</form:form>

  <script language="javascript">
	  $.validator.setDefaults({
	  });

	  $(document).ready(function() {
		  jQuery("#updatePwd").validate({
			  rules: {
				  oldPassword: {
					  required: true
				  },
				  password: {
					  required: true
				  },
				  password2:{
					  equalTo: "#password"
				  }
			  },
			  messages: {
				  oldPassword: {
					  required: '必填'
				  },
				  password: {
					  required: '必填'
				  },
				  password2:{
					  equalTo: "密码必须要一致"
				  }
			  }
		  });

	  });

</script>
